import { JSX } from "react";

export interface ITreeNode {
  label: string | JSX.Element;
  id: string | number;
  key?: string;
  children?: ITreeNode[];
  isDir: boolean;
  modTime: string;
  createTime: string;
  // text: string
}

export type IContextMenu = {
  enable: boolean;
  label?: string;
  id: string;
};
export enum MenuType {
  NEW_FOLDER = "newfolder",
  NEW_FILE = "newfile",
  RENAME = "rename",
  DELETE = "del",
  REFRESH = "refresh",
}

export interface ISetting {
  accessPassword: string;
  dataPath: string;
  fileAccessPassword: string;
  port: number;
  useAccessPassword: boolean;
}

export interface IPostItem {
    parentPath?: string
    oldName?: string
    newName: string
    isDir: boolean
}

export interface IResult<T> {
  success: boolean,
  msg: string,
  data: T
}

export interface IGitStatus {
  push: number,
  commit: number,
}